/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;


import java.util.ArrayList;
import java.util.Date;
import tuitionmanagement.DAO.RateDao;
import tuitionmanagement.entity.RateEntity;

/**
 *
 * @author XUAN
 */
public class RateBuss {

    RateDao ratedao = new RateDao();
    private String lastError;

    public ArrayList<RateEntity> getDateRateSearch(Date search) {
        return ratedao.getDateRateSearch(search);
    }

    public ArrayList<RateEntity> readByAll() {
        return ratedao.readByAll();
    }

    public boolean addRate(RateEntity rat) {
        return ratedao.addRate(rat);
    }

    public boolean update(RateEntity rate) {
        return ratedao.update(rate);
    }

    public boolean delete(int rateId) {
        return ratedao.delete(rateId);
    }

    /**
     * @return the lastError
     */
    public String getLastError() {
        return lastError;
    }

    /**
     * @param lastError the lastError to set
     */
    public void setLastError(String lastError) {
        this.lastError = lastError;
    }
}
